package com.adms.domain;

import java.util.List;

public class Grid {
	
//	
	private List<User> gridUsers;
	private Integer defaultGridUserId;
//	
	
    private Integer gridId;

    public List<User> getGridUsers() {
		return gridUsers;
	}

	public void setGridUsers(List<User> gridUsers) {
		this.gridUsers = gridUsers;
	}

	public Integer getDefaultGridUserId() {
		return defaultGridUserId;
	}

	public void setDefaultGridUserId(Integer defaultGridUserId) {
		this.defaultGridUserId = defaultGridUserId;
	}


	private String name;

    public Integer getGridId() {
        return gridId;
    }

    public void setGridId(Integer gridId) {
        this.gridId = gridId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((defaultGridUserId == null) ? 0 : defaultGridUserId.hashCode());
		result = prime * result + ((gridId == null) ? 0 : gridId.hashCode());
		result = prime * result + ((gridUsers == null) ? 0 : gridUsers.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Grid other = (Grid) obj;
		if(this.gridId.equals(other.gridId)) {
			return true;
		}else {
			return false;
		}
	}
}